import request from '@/utils/request'

export const userList = (pageNum,pageSize,{ username, nickname, roleType, phone, email, status }
) => request.get('/users', {params: {pageNum,pageSize,username,nickname,roleType,phone,email,status}})

export const userAdd = (data) => request.post('/users', data)
export const userEdit = (data) => request.put('/users', data)
export const userDelete = (id) => request.delete(`/users/${id}`)
export const userInfo = (id) => request.get(`/users/${id}`)
export const userStatus = (id, status) => request.put(`/users/${id}/status?status=${status}`)
export const userPassword = (id, newPassword) => request.put(`/users/${id}/password?newPassword=${newPassword}`)